-- GENERATED SPELL FOR [Boulderfist Mage] --


function spell0_17137(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17137', 30336, 1)
end

function spell1_17137(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(20795,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17137', 667, 1)
end

function spell2_17137(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17137', 7000, 1)
end

function Sorts_17137(pUnit, Event)
local choix_sorts_17137 = math.random(0, 2)
if choix_sorts_17137 == 0 then
pUnit:RegisterEvent('spell0_17137', 1, 1)
end
if choix_sorts_17137 == 1 then
pUnit:RegisterEvent('spell1_17137', 1, 1)
end
if choix_sorts_17137 == 2 then
pUnit:RegisterEvent('spell2_17137', 1, 1)
end
end

function mob17137_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17137', math.random(1500, 3000), 1)
end

function mob17137_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17137_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17137_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17137, 1, 'mob17137_Action')
RegisterUnitEvent(17137, 2, 'mob17137_Leave')
RegisterUnitEvent(17137, 3, 'mob17137_Kill')
RegisterUnitEvent(17137, 4, 'mob17137_Die')
